<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>My Feed Dialog Page</title>
  </head>
  <body>
    <div id='fb-root'></div>
    <script src='http://connect.facebook.net/en_US/all.js'></script>
    <p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
    <p id='msg'></p>

    <script> 
      FB.init({appId: "174012926099116", status: true, cookie: true});

      function postToFeed() {
	  
        var obj = {
          method: 'feed',			  redirect_uri: 'http://yoandinkov.telerik-students.org/stuff/closure.html',          
          link: 'http://yoandinkov.telerik-students.org/js-project/',
          picture: 'http://yoandinkov.telerik-students.org/stuff/big-logo.png',
          name: 'Daily Stats',
          caption: 'Add your daily training status.',
          description: 'Please share daily training activities and your current progress.'
        };

        function callback(response) {			self.close();
        }

        FB.ui(obj, callback);
      }

    </script>
  </body>
</html>

